home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re MenuKey's problem.2 < prev    next >
Encoding:
Internet Message Format  |  1996-08-16  |  1.2 KB  |  [TEXT/ttxt]

  1. Subject:     Re: MenuKey's problem
  2. Sent:        8/16/96 10:19 AM
  3. Received:    8/16/96 10:31 AM
  4. From:        Mary Boetcher, boetche1@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. There is another way to set a MenuKey on a Japanese system. If you set the script code of the menu string in the resource to Japanese, then the menu string's locale.fScriptCode will be correct in PrivInitTextItem.
  9.  
  10. Here is how to make a Japanese menu string:
  11.  
  12. #define smJapanese 1
  13. #define langJapanese 11
  14.  
  15. // In order to change the constants in FW_RStringData, we have to subclass it like this:
  16. type RJStringData : FW_RStringData (ScriptCode = smJapanese, LanguageCode = langJapanese)
  17. {
  18. };
  19.  
  20. resource FW_RMenuBar(kMenuBar)
  21. {
  22.     {
  23.         FW_RPullDownMenu
  24.         (
  25.             "Example"
  26.             {
  27.                 FW_RTextItem(23456, 'J', RJStringData("ó·"))
  28.             }
  29.         )
  30.     }
  31. };
  32.  
  33. Mary Boetcher
  34. ODF Person
  35.  
  36. ---
  37. >GetScriptManagerVariable(smSysScript) in FW_CTextItem::PrivInitTextItem()
  38. >return 1 from Japanese-System.
  39. >And locale.fScriptCode of MenuString in FW_CTextItem::PrivInitTextItem() 
  40. >is 0.
  41. >
  42. >So I can not set MenuKey.
  43. >
  44. >Now I set 0 to SysScript before I call FW_CMenuBar::InitializeFromResource().
  45. >Then I can set MenuKey.
  46.